<?php $this->_extends('_layouts/default_layout'); ?>
 
<?php $this->_block('contents'); ?>

<span><a href="<?php echo url('user/AddMember'); ?>">用户录入</a> | <a href="<?php echo url('user/manage'); ?>">用户管理</a><?php if ($current_user->permission_id == 1): ?> | <a href="<?php echo url('user/AddManager'); ?>">电信管理员添加</a> | <a href="<?php echo url('user/tianyimanage'); ?>">电信管理员管理</a><?php endif; ?>	</span>

<p><span class="error" name="tip">编辑用户的用户名为：<?php echo $edit_user->username ?> </span></p>
 
<form action="<?php echo url('user/edit'); ?>" method="post" name="mainform" enctype="multipart/form-data" 		

        onsubmit="
		if (this.username.value == '') { 
		alert('请输入用户真名'); 
		return false; }
		else { 
			return true; 
		}"

>
	<table cellpadding="0" cellspacing="0" width="100%">
	<tbody class="">

	<?php   
	?>
	<tr>
		<td><span class="defaultbold">用户真名</span></td>
		<td><input class="input" type="text" value="<?php echo $edit_user->user_realname ?>" name="user_realname" id="10011" size="36" /></td>
	</tr>

	<tr>
		<td><span class="defaultbold">用户手机</span></td>
		<td><input class="input" type="text" value="<?php echo $edit_user->user_cellphone ?>" name="user_cellphone" id="10011" size="36" /></td>
	</tr>

	<tr>
		<td><span class="defaultbold">用户办公室电话</span></td>
		<td><input class="input" type="text" value="<?php echo $edit_user->user_officetel ?>" name="user_officetel" id="10011" size="36" /></td>
	</tr>
<tr>
		<td><span class="defaultbold">用户职位</span></td>
		<td><input class="input" type="text" value="<?php echo $edit_user->reserved_1 ?>" name="user_work_position" id="10011" size="36" /></td>
	</tr>
<tr>
		<td><span class="defaultbold">用户IMSI号码</span></td>
		<td><input class="input" type="text" value="<?php echo $edit_user->user_email ?>" name="user_phone_meid" id="10011" size="36" /></td>
	</tr>

    <?php if ($depsCount>0): ?>
	<tr>
		<td><span class="defaultbold">用户部门</span><br /></td>
		<td> 
		<select name="department_id" >
        
            <?php if($dep_id == -1): ?>
                <option value="-1" id="-1" selected="selected">默认部门</option>
            <?php else: ?>
                <option value="-1" id="-1" >默认部门</option>
            <?php endif; ?>
			<?php foreach ($deps as $col): ?>
                <?php if($col->id() == $dep_id): ?>
                    <option value="<?php echo $col->id() ?>" id="<?php echo $col->id() ?>" selected="selected">
                    <?php echo $col->department_name; ?> 
                <?php else: ?>
                    <option value="<?php echo $col->id() ?>" id="<?php echo $col->id() ?>"><?php echo $col->department_name; ?>
                <?php endif; ?>
                </option>
			<?php endforeach; ?>
                        
		</select>
		</td>
	</tr>
	<?php endif; ?>

	<tr>
		<td><span class="defaultbold">用户类型</span><br /></td>
		<td class="tbutton" colspan="6">
		<input type="radio" name="checktype"  value="3"/>&nbsp;内容审核员&nbsp;&nbsp;
		<input type="radio" name="checktype" value="4" checked="checked" />&nbsp;普通用户
	</td>
	</tr>
	<tr>
		<td><span class="defaultbold">客户端不可见</span></td>
                <td><input class="input" type="checkbox" name="client_visibility" value="on"
<?php 
if($edit_user->user_status == -1)
{
    echo "checked=\"checked\"";
}
?>
/>勾选后此电话号码不发送给客户端</td>
               
	</tr>
	<tr>
	    <input type="hidden" name="user_id" id="column_id" value="<?php echo $edit_user->id() ?>" />

		<td class="tbutton" colspan="6"><input type="submit"  value="提交" class="btn" name="submit">&nbsp;</td>
	</tr>
	</tbody>
	</table>
</form>

<?php $this->_endblock(); ?>
